package com.example.dynamicschedule.utils;

import org.springframework.stereotype.Repository;

@Repository
public class BaseInformationUtils {
    /**
     * 获取性别
     *
     * @param code
     * @return
     */
    public String getSexStr(String code) {
        String result = null;
        switch (code) {
            case "0": {
                result = "未知的性别";
                break;
            }
            case "1": {
                result = "男性";
                break;
            }
            case "2": {
                result = "女性";
                break;
            }
            case "9": {
                result = "未明确性别";
                break;
            }
            default: {
                result = "未明确性别";
                break;
            }
        }
        return result;
    }

    /**
     * 获取是否结婚
     *
     * @param code
     * @return
     */
    public String getMarital(String code) {
        String result = null;
        switch (code) {
            case "10":
                result = "未婚";
                break;
            case "20":
                result = "已婚";
                break;
            case "21":
                result = "初婚";
                break;
            case "22":
                result = "再婚";
                break;
            case "23":
                result = "复婚";
                break;
            case "30":
                result = "丧偶";
                break;
            case "40":
                result = "离婚";
                break;
            case "90":
                result = "未说明的婚姻关系";
                break;
            default:
                result = "未说明的婚姻关系";
                break;

        }
        return result;
    }

    /**
     * 获取学历
     *
     * @param code
     * @return
     */
    public String getEducation(String code) {
        String result = null;
        switch (code) {
            case "10":
                result = "研究生教育";
                break;
            case "11":
                result = "博士研究生毕业";
                break;
            case "12":
                result = "博士研究生结业";
                break;
            case "13":
                result = "博士研究生肄业";
                break;
            case "14":
                result = "硕士研究生毕业";
                break;
            case "15":
                result = "硕士研究生结业";
                break;
            case "16":
                result = "硕士研究生肄业";
                break;
            case "17":
                result = "研究生班毕业";
                break;
            case "18":
                result = "研究生班结业";
                break;
            case "19":
                result = "研究生班肄业";
                break;
            case "20":
                result = "大学本科教育";
                break;
            case "21":
                result = "大学本科毕业";
                break;
            case "22":
                result = "大学本科结业";
                break;
            case "23":
                result = "大学本科肄业";
                break;
            case "28":
                result = "大学普通班毕业";
                break;
            case "30":
                result = "大学专科教育";
                break;
            case "31":
                result = "大学专科毕业";
                break;
            case "32":
                result = "大学专科结业";
                break;
            case "33":
                result = "大学专科肄业";
                break;
            case "40":
                result = "中等职业教育";
                break;
            case "41":
                result = "中等专科毕业";
                break;
            case "42":
                result = "中等专科结业";
                break;
            case "43":
                result = "中等专科肄业";
                break;
            case "44":
                result = "职业高中毕业";
                break;
            case "45":
                result = "职业高中结业";
                break;
            case "46":
                result = "职业高中肄业";
                break;
            case "47":
                result = "技工学校毕业";
                break;
            case "48":
                result = "技工学校结业";
                break;
            case "49":
                result = "技工学校肄业";
                break;
            case "60":
                result = "普通高级中学教育";
                break;
            case "61":
                result = "高中毕业";
                break;
            case "62":
                result = "高中结业";
                break;
            case "63":
                result = "高中肄业";
                break;
            case "70":
                result = "初级中学教育";
                break;
            case "71":
                result = "初中毕业";
                break;
            case "72":
                result = "初中结业";
                break;
            case "73":
                result = "初中肄业";
                break;
            case "80":
                result = "小学教育";
                break;
            case "81":
                result = "小学毕业";
                break;
            case "83":
                result = "小学肄业";
                break;
            case "90":
                result = "其他";
                break;
            default:
                result = "其他";
                break;

        }
        return result;
    }

}
